<!DOCTYPE html>
<html>
<head>
  <title>Coffee 2 Go</title>
  <%= stylesheet_link_tag 'resetCSS', :media => 'all' %>
  <%= stylesheet_link_tag 'application', :media => 'all' %>
  <%= stylesheet_link_tag 'product', :media => 'all' %>
  <%= stylesheet_link_tag 'login', :media => 'all' %>
  <%= stylesheet_link_tag 'adminpage', :media => 'all' %>
  <style type="text/css"><%= yield :adminpage %></style>
  <%= javascript_include_tag 'application' %>
  <%= javascript_include_tag 'jquery-face' %>
  <%= javascript_include_tag 'jquery-ui-1.8.2.custom.min.js' %>
  <%= csrf_meta_tags %>
</head>
<body>
<div id="wrap">
  <div id="top-menu">
    <% if !session[:user].is_a?(User) || session[:user] == nil || session[:user].username == 'guest' %>
        <ul>
          <li><a href="#" id="login-btn" class="hyperlink-detail">Đăng nhập</a></li>
          <div id="login-box">
            <div id="login-box-content">
              <form action="/user/login" id="login-form" method="post">
                <label>
                  <input type="text" placeholder="Username" name="username_lg"/>
                </label>
                <label>
                  <input type="password" placeholder="Password" name="password_lg"/>
                </label>
                <input id="dangnhap-btn" type="submit" value="Đăng nhập"/>
              </form>
            </div>
          </div>
          <li><a href="/user/create" class="hyperlink-detail">Đăng ký</a></li>
        </ul>
    <% else %>
        <%= render 'layouts/headeruser' %>
    <% end %>
  </div>
  <div id="header">
    <a href="/homepage/index">
      <div id="logo"></div>
    </a>
    <nav id="nav">
      <ul>
        <li><a href="/homepage/index">Trang Chủ</a></li>
        <li>
          <a href="/product/index">Cà Phê</a>
          <ul>
            <li><a href="/product/index?type=coffee">Cà Phê</a></li>
            <li><a href="/product/index?type=drink">Thức uống khác</a></li>
            <li><a href="/product/index?type=food">Đồ ăn nhanh</a></li>
          </ul>
        </li>
        <li>
          <a href="/google_map/index">Tản mạn</a>
        </li>
        <li>
          <a href="/google_map/index">Liên Hệ</a>
        </li>
        <li>
          <a href="/feedback/index">Góp ý</a>
        </li>
      </ul>
    </nav>
    <div id="right-header">
      <div id="search-btn"></div>
      <div id="cart-btn"></div>
    </div>
  </div>
  <div id="weasel-coffee"></div>
  <div id="main">
    <div id="main-frame">
      <%= content_for?(:admin) ? yield(:admin) : yield %>
    </div>
  </div>
  <div id="footer">
    <%= render('layouts/footer') %>
  </div>
</div>
</body>
</html>

